//自定义组件
import Message from "./Message.vue";
const obj = {};
obj.install = (Vue) => {
  const Com = Vue.extend(Message);
  console.log(Com);
  const currentCom = new Com();
  console.log(currentCom);
  const messageEl = currentCom.$mount().$el;
  document.body.appendChild(messageEl);
  currentCom.prototype.$aaa = ({ title, type }) => {
    currentCom.msg = title;
    currentCom.className = type;
    currentCom.flag = true;
    setTimeout(() => {
      currentCom.flag = false;
    }, 1500);
  };
};
export default obj;
